<template>
  <slot></slot>
</template>
<script lang="ts" setup>
import { theme } from "ant-design-vue";
import { watch } from "vue";

const { token } = theme.useToken();
const styleDom = document.createElement("style");
watch(
  token,
  (n) => {
    styleDom.innerHTML = `:root {
      --primary-color: ${n.colorPrimary};
      --border-radius: ${n.borderRadius}px;
    }`;
  },
  { immediate: true }
);
document.body.appendChild(styleDom);
</script>
